<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // ...展开运算符
    // ...不能直接展开一个对象,会报错
    // 构造字面量对象时,进行克隆或者属性拷贝（ECMAScript 2018规范新增特性）：
    // let objClone = { ...obj };
    const person1 = {name: 'zs', gender: '男', age: 18}
    const person2 = {...person1}
    console.log(person2);

  </script>
</body>
</html>